package com.fl.serivce;

import com.fl.dao.ParamDao;
import com.fl.sys.SysConfig;
import com.fl.util.LicenseUtil;
import com.fl.util.SecurityUtil;

public class LicenseService {

	public static String getSerialNumber() {
		try {
			return SecurityUtil.MD5(LicenseUtil.getSerialNumber());
		} catch (Exception e) {
			return "获取机器码失败：" + e.getMessage();
		}
	}
	
	public static String makeLicense() throws Exception{
			return SecurityUtil.MD5("ll"+LicenseUtil.getSerialNumber()+"ll");
	}

	public static String getMAC() throws Exception {
		return ParamDao.getParamTableVal(SysConfig.MAC);
	}

	public static String getLicense() throws Exception {
		return ParamDao.getParamTableVal(SysConfig.LICENSE);
	}
}
